package observer.jdk;

public class Client {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData(10, 150, 40);
        UserInfoData userInfoData = new UserInfoData("杜甫", 20);
        ThirdPartObserver thirdPartObserver = new ThirdPartObserver();
        weatherData.addObserver(thirdPartObserver);
        userInfoData.addObserver(thirdPartObserver);

        weatherData.setFahrenheit();
        weatherData.updateTemperature();
        userInfoData.updateTemperature();
    }
}
